package com.buba.wxchengxu.Utils;

import com.cloopen.rest.sdk.CCPRestSmsSDK;
import java.util.HashMap;

public class SendSMSUtils {


	public static boolean sendMSM(String phone, String code){
		
		HashMap<String,Object> result = null;
		
		//��ʼ��SDK
		CCPRestSmsSDK restAPI = new CCPRestSmsSDK();
		
		restAPI.init("app.cloopen.com", "8883");//https://app.cloopen.com:8883
		
		//����ҵ����Ϣ
		//��ʼ�����˺����ƺ����˺�����
		restAPI.setAccount("8aaf07086772ac61016786462f8f1472", "732c888d3e9b4f64a70904ff9c21ed48");
		restAPI.setAppId("8aaf07086772ac61016786462fed1479");
		
		//��ʹ�ù������̨���Ѵ���Ӧ�õ�APPID,��13800000000�ֻ����յ��Ķ���������:[��ͨѶ]��ʹ�õ�����ͨѶ����ģ��,������֤����6532,����5������
		result = restAPI.sendTemplateSMS(phone, "1", new String [] {code,"5"});
		
		if("000000".equals(result.get("statusCode"))){
			
			return true;
		}else{
			
			return false;
		}
		
	}
	
}
